<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<link rel="stylesheet" type="text/css"
	href="<c:url value="/resources/css/login.css"/>" />
<script src="<c:url value="/resources/js/validation/signup.js"/>"></script>

<form:form class="form-signin" onsubmit="return validate()"
	commandName="subscriber">
	<h2 class="form-signin-heading">
		<spring:message code="sign_up.header" text="Please Sign up" />
	</h2>
	
	<spring:message code="username" text="Username" var="username"/>
	<div id="notValidUsername" class="alert alert-warning"
		style="display: none;">
		<spring:message code="sign_up.not_valid" text="Not Valid" />
		${username}
	</div>
	<form:input class="input-block-level" path="username" 
		placeholder="${username}" />
		
	<spring:message code="password" text="Password" var="password"/>
	<div id="notValidPassword" class="alert alert-warning"
		style="display: none;">
		<spring:message code="sign_up.not_valid" text="Not Valid" />
		${password}
	</div>
	<form:password class="input-block-level" path="password"
		placeholder="${password}" />
		
	<spring:message code="first_name" text="First Name" var="first_name"/>	
	<div id="notValidFirstname" class="alert alert-warning"
		style="display: none;">
		<spring:message code="sign_up.not_valid" text="Not Valid" />
		${first_name}
	</div>
	<form:input class="input-block-level" path="firstname"
		placeholder="${first_name}" />
		
	<spring:message code="last_name" text="Last Name" var="last_name"/>	
	<div id="notValidLastname" class="alert alert-warning"
		style="display: none;">
		<spring:message code="sign_up.not_valid" text="Not Valid" />
		${last_name}
	</div>
	<form:input class="input-block-level" path="lastname"
		placeholder="${last_name}" />
		
		
	<input type="submit" class="btn btn-block btn-primary"
		value="<spring:message code="sign_up" text="Sign Up" />" />
</form:form>